package designMode.strategyPattern;

/**
 * @ClassName Test
 * @Description
 * @Author LIBOFEI
 * @Date 2020/6/14 17:00
 * @Version 1.0
 **/
public class Test {

    public static void main(String[] args) {
        Duck duck = new  MallardDuck();
        duck.performFly();
        duck.performQuack();

        Duck duck2 = new ModelDuck();
        duck2.performFly();
        duck2.setFlyBehavior(new FlyRocketPowered());
        duck2.performFly();
        duck2.performQuack();
    }
}
